package com.allwees.bs.c.module.ops.repository;

import com.allwees.bs.c.module.base.repository.BaseRepository;
import com.allwees.bs.c.module.ops.entity.CashActiveDefEntity;
import com.allwees.bs.core.model.coupon.constant.ECashUseType;
import org.springframework.data.jpa.repository.Query;


public interface CashActiveDefRepository extends BaseRepository<CashActiveDefEntity, Integer> {

    @Query(value = "select t from CashActiveDefEntity t where isDeleted = 0 and uuid=:uuid")
    CashActiveDefEntity getByUuid(String uuid);

    @Query(value = "select t from CashActiveDefEntity t where isDeleted = 0 and useType=:useType")
    CashActiveDefEntity findByUseType(ECashUseType useType);
}
